package online.chazi.bootplus.commons.utils;

import java.time.Duration;

/**
 * 说明：作者很懒，什么都没留下
 * Created by 叉子同学 on 2020-04-13 15:37
 */
public class SleepUtils {

    public final static Duration AWHILE_100millis = Duration.ofMillis(100);
    public final static Duration AWHILE_300millis = Duration.ofMillis(300);
    public final static Duration AWHILE_500millis = Duration.ofMillis(500);
    public final static Duration AWHILE_1second = Duration.ofSeconds(1);

    public static void sleep(Duration duration) {
        try {
            Thread.sleep(duration.toMillis());
        } catch (InterruptedException e) {
            //
        }
    }

}
